<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    {if $admin_type == 3}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Product_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-product_id" data-rule="required" data-source="product/indexlist" data-params='{"custom[factory_id]":factory_id}' class="form-control selectpage" data-field="code" name="row[product_id]" type="text" value="">
        </div>
    </div>
    {/if}
    {if $admin_type != 3}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Product_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-product_id" data-rule="required" data-source="product/index" class="form-control selectpage" data-field="code" name="row[product_id]" type="text" value="">
        </div>
    </div>
    {/if}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('产品名称')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-product_name" class="form-control" name="row[product_name]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('所属工厂')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-factory_title" class="form-control" name="row[factory_title]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('工厂收件人')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-factory_name" class="form-control" name="row[factory_title]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('电话')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-factory_phone" class="form-control" name="row[factory_title]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('地址')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-factory_address" class="form-control" name="row[factory_title]" type="text">
        </div>
    </div>
    <div id="sjx">
    {if $admin_type != 3}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-image"  class="form-control" size="50" name="row[image]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp,video/mp4,video/flv" data-multiple="true" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*,video/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-image"></ul>
        </div>
    </div>
    {/if}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('用户说明')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-user_content" class="form-control editor" rows="5" name="row[user_content]" cols="50"></textarea>
        </div>
    </div>
    {if $admin_type != 3}
    <!--<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('售后负责人')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-admin_id"  data-source="work/workadmin" data-params='{"custom[type]":"2"}' class="form-control selectpage" data-primary-key="id" data-field="username" name="row[admin_id]" type="text" value="">
        </div>
    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('选择渠道')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-channel_id"  data-source="channel/index" class="form-control selectpage" data-field="name" name="row[channel_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Order_image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-order_image" class="form-control" size="50" name="row[order_image]" type="text" value="">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-order_image" class="btn btn-danger faupload" data-input-id="c-order_image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-order_image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-order_image" class="btn btn-primary fachoose" data-input-id="c-order_image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-order_image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-order_image"></ul>
        </div>
    </div>
    {/if}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('是否自动审核')}:</label>
        <div class="col-xs-12 col-sm-8" id="sone">

            <div class="radio">
                {foreach name="isStatuslList" item="vo"}
                <label for="row[isstatus]-{$key}"><input id="row[isstatus]-{$key}" name="row[isstatus]" type="radio" value="{$key}" {in name="key" value="2"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
        <div class="col-xs-12 col-sm-8" id="stwo">

            <div class="radio">
                {foreach name="isStatuslListtwo" item="vo"}
                <label for="row[isstatus1]-{$key}"><input id="row[isstatus1]-{$key}" name="row[isstatus1]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('店铺')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-shop_name" class="form-control" name="row[shop_name]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('订单号')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-order_code" class="form-control" name="row[order_code]" type="text">
        </div>
    </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('收件人姓名')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-res_receiver" class="form-control" name="row[res_receiver]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('收件人手机号')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-res_mobile" class="form-control" name="row[res_mobile]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('收件人地址')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-res_address" class="form-control" name="row[res_address]" type="text">
        </div>
    </div>
    <div id="sjx1">
    {if $admin_type == 3}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('寄修单号')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input onfocus = "cs(this)" id="c-user_shipper_code" class="form-control"  name="row[user_shipper_code]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('确认收货时间')}:</label>
        <div class="col-xs-12 col-sm-8">

            <input class="form-control datetimepicker"
                   data-date-format="YYYY-MM-DD HH:mm:ss"
                   data-use-current="true"
                   id="c-confirm_time"
                   type="text"
                   name="row[confirm_time]"
                   placeholder="请选择时间">
        </div>
    </div>
    {/if}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('购买时间')}:</label>
        <div class="col-xs-12 col-sm-8">

            <input class="form-control datetimepicker"
                   data-date-format="YYYY-MM-DD HH:mm:ss"
                   data-use-current="true"
                   id="c-real_pay_time"
                   type="text"
                   name="row[real_pay_time]"
                   placeholder="请选择时间">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('备注')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-remarks" class="form-control" name="row[remarks]" type="text">
        </div>
    </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
<script type="text/javascript">
    // === 设置分数上限
    function cs (price) {

        console.log("进入方法","number =",price.value);
        const moment = require('moment');
        var max_integral= moment().format('YYYY-MM-DD HH:mm:ss');
        $("#c-confirm_time").val(max_integral)
    }
</script>
